<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%--<%@ page session="false" %>--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<%--<!DOCTYPE html>--%>
<html lang="en-us" id="extr-page">
<head>
    <meta charset="utf-8">
    <title> ISPC </title>
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <!-- #CSS Links -->
    <!-- Basic Styles -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" media="screen" href="css/font-awesome.min.css">

    <!-- SmartAdmin Styles : Please note (smartadmin-production.css) was created using LESS variables -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-production.min.css">
    <link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-skins.min.css">

    <link rel="stylesheet" type="text/css" media="screen" href="css/demo.min.css">

    <!-- #FAVICONS -->
    <link rel="shortcut icon" href="img/favicon/favicon.ico" type="image/x-icon">
    <link rel="icon" href="img/favicon/favicon.ico" type="image/x-icon">

    <!-- iOS web-app metas : hides Safari UI Components and Changes Status Bar Appearance -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <style>
        #extr-page #header {
            overflow: visible;
        }
    </style>
</head>

<body class="animated fadeInDown">

<header id="header">
    <div id="logo-group">
		<span id="logo">
			<img src="img/logo-int.png" alt="Intelligent">
		</span>
    </div>

    <div class="pull-right">
        <ul class="header-dropdown-list hidden-xs">
            <li>
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <img src="img/blank.gif" class="flag <spring:message code='GLOBAL_LANG_FLG_CURRENT'/>"
                         alt="United States">
                    <span> <spring:message code="GLOBAL_LANG_CURRENT"/> </span> <i class="fa fa-angle-down"></i>
                </a>
                <ul class="dropdown-menu pull-right">

                    <li>
                        <a href="login?lang=en">
                            <img src="img/blank.gif" class="flag <spring:message code='GLOBAL_LANG_FLG_EN'/>"
                                 alt="<spring:message code='GLOBAL_LANG_FLG_EN'/>"> <spring:message
                                code="GLOBAL_LANG_EN"/>
                        </a>
                    </li>
                    <%--<li>
                        <a href="login?lang=zh">
                            <img src="img/blank.gif" class="flag <spring:message code='GLOBAL_LANG_FLG_CN'/>"
                                 alt="<spring:message code='GLOBAL_LANG_FLG_CN'/>"> <spring:message
                                code="GLOBAL_LANG_ZH"/>
                        </a>
                    </li>--%>
                </ul>
            </li>
        </ul>
    </div>
    <%--<div id="extr-page-header-space">--%>
    <%--<span class="hidden-mobile">Need an account?</span>--%>
    <%--<a href="register.html" class="btn btn-danger">Create account</a>--%>
    <%----%>
    <%--</div>--%>

</header>

<div id="main" role="main">

    <!-- MAIN CONTENT -->
    <div id="content" class="container">

        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-7 col-lg-8 hidden-xs hidden-sm">
                <h1 class="txt-color-red login-header-big">ISPC</h1>

                <div class="hero">

                    <div class="pull-left login-desc-box-l">
                        <h4 class="paragraph-header">It's Okay to be System. Experience the simplicity of ISPC,
                            everywhere you go!</h4>
                        <%--<div class="login-app-icons">--%>
                        <%--<a href="javascript:void(0);" class="btn btn-danger btn-sm">Frontend Template</a>--%>
                        <%--<a href="javascript:void(0);" class="btn btn-danger btn-sm">Find out more</a>--%>
                        <%--</div>--%>
                    </div>

                    <%--<img src="img/demo/iphoneview.png" class="pull-right display-image" alt="" style="width:210px">--%>

                </div>

                <div class="row">
                    <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                        <h5 class="about-heading">How to use the ISPC?</h5>

                        <p>
                            some description.
                        </p>
                    </div>
                    <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                        <h5 class="about-heading">Not just your average data!</h5>

                        <p>
                            some description.
                        </p>
                    </div>
                </div>

            </div>
            <div class="col-xs-12 col-sm-12 col-md-5 col-lg-4">
                <div class="well no-padding">
                    <form action="login" id="login-form" class="smart-form client-form" method="post">
                        <header>
                            <spring:message code="LOGIN_TITLE"/>
                        </header>

                        <fieldset>
                            <section>
                                <label class="label"><spring:message code="LOGIN_USER_NAME"/></label>
                                <label class="input"><i class="icon-append fa fa-user"></i>
                                    <input type="text" name="username" value="${username}">
                                    <b class="tooltip tooltip-top-right"><i class="fa fa-user txt-color-teal"></i>
                                        <spring:message var="LOGIN_USER_NAME" code="LOGIN_USER_NAME"/>
                                        <spring:message code="VALIDATE_REQUIRED"
                                                        arguments="${LOGIN_USER_NAME}"/></b></label>
                            </section>

                            <section>
                                <label class="label"><spring:message code="LOGIN_USER_PWD"/></label>
                                <label class="input"> <i class="icon-append fa fa-lock"></i>
                                    <input type="password" name="password">
                                    <b class="tooltip tooltip-top-right"><i class="fa fa-lock txt-color-teal"></i>
                                        <spring:message var="LOGIN_USER_PWD" code="LOGIN_USER_PWD"/>
                                        <spring:message code="VALIDATE_REQUIRED" arguments="${LOGIN_USER_PWD}"/></b>
                                </label>

                                <div class="note txt-color-red">
                                    <%--<a href="forgotpassword.html">Forgot password?</a>--%>
                                    <c:choose>
                                        <c:when test="${shiroLoginFailure != null}">
                                            <i class="fa fa-exclamation-triangle"></i>
                                            <c:if test="${fn:contains(shiroLoginFailure, 'DisabledAccountException')}">
                                                <spring:message code='EXCEPTION_LOGIN_DISABLE'/>
                                            </c:if>
                                            <c:if test="${fn:contains(shiroLoginFailure, 'IncorrectCredentialsException')}">
                                                <spring:message code='EXCEPTION_LOGIN_FAIL'/>
                                            </c:if>
                                            <c:if test="${fn:contains(shiroLoginFailure, 'UnknownAccountException')}">
                                                <spring:message code='EXCEPTION_LOGIN_FAIL'/>
                                            </c:if>
                                            <c:if test="${fn:contains(shiroLoginFailure, 'AuthenticationException')}">
                                                <spring:message code='EXCEPTION_LOGIN_FAIL'/>
                                            </c:if>
                                            <c:if test="${fn:contains(shiroLoginFailure, 'LockedAccountException')}">
                                                <spring:message code='EXCEPTION_LOGIN_LOCKED'/>
                                            </c:if>
                                            <c:if test="${fn:contains(shiroLoginFailure, 'ConcurrentAccessException')}">
                                                <spring:message code='EXCEPTION_LOGIN_NO_PERMISIONS'/>
                                            </c:if>
                                        </c:when>
                                        <c:otherwise>
                                        </c:otherwise>
                                    </c:choose>
                                </div>
                            </section>

                            <section>
                                <label class="checkbox">
                                    <input type="checkbox" name="rememberme" checked="">
                                    <i></i><spring:message code="LOGIN_STAY_SIGNED_IN"/></label>
                            </section>

                        </fieldset>
                        <footer>
                            <button type="submit" class="btn btn-primary">
                                <spring:message code="LOGIN_BUTTON_SUBMIT"/>
                            </button>
                        </footer>
                    </form>
                </div>
            </div>
        </div>
    </div>

</div>

<!--================================================== -->

<!-- PACE LOADER - turn this on if you want ajax loading to show (caution: uses lots of memory on iDevices)-->
<script src="js/plugin/pace/pace.min.js"></script>

<!-- Link to Google CDN's jQuery + jQueryUI; fall back to local -->
<%--<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>--%>
<script> if (!window.jQuery) {
    document.write('<script src="js/libs/jquery-2.0.2.min.js"><\/script>');
} </script>

<%--<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>--%>
<script> if (!window.jQuery.ui) {
    document.write('<script src="js/libs/jquery-ui-1.10.3.min.js"><\/script>');
} </script>

<!-- JS TOUCH : include this plugin for mobile drag / drop touch events
<script src="js/plugin/jquery-touch/jquery.ui.touch-punch.min.js"></script> -->

<!-- BOOTSTRAP JS -->
<script src="js/bootstrap/bootstrap.min.js"></script>

<!-- JQUERY VALIDATE -->
<script src="js/plugin/jquery-validate/jquery.validate.min.js"></script>

<!-- JQUERY MASKED INPUT -->
<script src="js/plugin/masked-input/jquery.maskedinput.min.js"></script>

<script src="js/plugin/i18n/jquery.i18n.properties.js"></script>

<%--Jquery Cookie--%>
<script src="js/libs/jquery.cookie.js"></script>

<!--[if IE 8]>

<h1>Your browser is out of date, please update your browser by going to www.microsoft.com/download</h1>

<![endif]-->

<!-- MAIN APP JS FILE -->
<script src="js/app.config.js"></script>
<script src="js/app.js"></script>

<script type="text/javascript">
    function getRootPath() {
        var curWwwPath = window.document.location.href;
        var pathName = window.document.location.pathname;
        var pos = curWwwPath.indexOf(pathName);
        var localhostPaht = curWwwPath.substring(0, pos);
        var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
        return (localhostPaht + projectName);
    }

    loadScript("js/core/login.js", init);
    function init() {
        initLogin();
    }
</script>

</body>
</html>